Package-level declarations

Types

Link copied to clipboard
data class AgentIdentity(val publicKeyBlob: ByteArray, val comment: String, val destinationConstraints: List<DestinationConstraint>? = null)

A public key identity available in the agent.

Link copied to clipboard
data class AgentKeySpec(val keyBlob: ByteArray, val isCa: Boolean)

A host key specification used in destination constraints.

Link copied to clipboard
interface AgentProvider

Provider interface for SSH agent forwarding.

Link copied to clipboard
sealed interface AgentResult<out T>

Result of an AgentProvider callback.

Link copied to clipboard

Signature flags for agent sign requests.

Link copied to clipboard
data class AgentSigningContext(val publicKeyBlob: ByteArray, val dataToSign: ByteArray, val flags: Int, val sessionId: ByteArray, val serverHostKey: ByteArray, val isBound: Boolean)

Context for agent signing decisions.

Link copied to clipboard
interface AuthHandler

Callback-driven authentication handler.

Link copied to clipboard
data class AuthPublicKey(val algorithmName: String, val publicKeyBlob: ByteArray)

An SSH public key for authentication probing.

Link copied to clipboard
data class ConnectionInfo(val kexAlgorithm: String, val serverHostKeyAlgorithm: String, val encryptionAlgorithmC2S: String, val encryptionAlgorithmS2C: String, val macAlgorithmC2S: String?, val macAlgorithmS2C: String?)

Negotiated algorithm details for an established SSH connection.

Link copied to clipboard
sealed interface ConnectResult
Link copied to clipboard
data class DestinationConstraint(val fromHostname: String, val fromKeyspecs: List<AgentKeySpec>, val toUsername: String, val toHostname: String, val toHostspecs: List<AgentKeySpec>)

One hop entry in a destination constraint for a key in the agent.

Link copied to clipboard
interface HostKeyVerifier

Verifies the identity of a server by checking its host key.

Link copied to clipboard

Callback for keyboard-interactive authentication (RFC 4256).

Link copied to clipboard

SSH key fingerprint utilities.

Link copied to clipboard
class KnownHostsVerifier(file: File, hostname: String, port: Int = 22) : HostKeyVerifier

A host key verifier that reads from an OpenSSH-style known_hosts file.

Link copied to clipboard
sealed class PingResult

Result of a SshClient.ping call.

Link copied to clipboard

Handle to an active port forwarding.

Link copied to clipboard
data class PublicKey(val type: String, val encoded: ByteArray)

A generic public key representation.

Link copied to clipboard
sealed interface SessionExit

How the remote process on a session channel terminated (RFC 4254 section 6.10).

Link copied to clipboard
data class SftpAttributes(val size: Long? = null, val uid: Int? = null, val gid: Int? = null, val permissions: Int? = null, val atime: Int? = null, val mtime: Int? = null)

File attributes for SFTP operations (SFTPv3 ATTRS structure).

Link copied to clipboard

SFTP client for file transfer over SSH (draft-ietf-secsh-filexfer).

Link copied to clipboard
data class SftpDirectoryEntry(val filename: String, val longname: String, val attrs: SftpAttributes)

Entry from an SFTP directory listing.

Link copied to clipboard
class SftpException(val statusCode: SftpStatusCode, message: String, cause: Throwable? = null) : SshException

Exception thrown for SFTP protocol errors.

Link copied to clipboard

Opaque file or directory handle returned by SFTP open/opendir operations.

Link copied to clipboard

Flags for SFTP file open operations.

Link copied to clipboard
sealed interface SftpResult<out T>

Result type for SFTP operations. Replaces thrown exceptions with a sealed interface so callers can handle errors structurally.

Link copied to clipboard

SFTP status codes (draft-ietf-secsh-filexfer-02 section 7).

Link copied to clipboard

Authenticator for SOCKS5 username/password auth (RFC 1929).

Link copied to clipboard
class SshClient

High-level async SSH client API.

Link copied to clipboard

Configuration for SSH client connections.

Link copied to clipboard
open class SshException(message: String, cause: Throwable? = null) : Exception
Link copied to clipboard
object SshKeys

Key management utilities for SSH private keys.

Link copied to clipboard

Represents an SSH session channel (RFC 4254 section 6).

Link copied to clipboard
object SshSigning

Utility for signing authentication data with local private keys.

Link copied to clipboard

Handle to an active stream forwarding through SSH.

Functions

Link copied to clipboard
fun <T> SftpResult<T>.getOrNull(): T?

Convenience: extract value or null for success, throws nothing.

Link copied to clipboard

Convenience: extract value or throw for interop with blocking APIs.